package com.itheima.tliasmanagement.controller;

import com.itheima.tliasmanagement.dto.PageDTO;
import com.itheima.tliasmanagement.entity.OperateLog;
import com.itheima.tliasmanagement.service.OperateLogService;
import com.itheima.tliasmanagement.vo.PageBean;
import com.itheima.tliasmanagement.vo.Result2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/log")
public class LogController {

    @Autowired
    private OperateLogService logService;

    @GetMapping("/page")
    public Result2<PageBean<OperateLog>> pageQuery(PageDTO dto){
        PageBean<OperateLog> page = logService.pageQuery(dto);
        return Result2.ok(page);
    }

}
